package com.bridge.demo2;

import com.bridge.demo1.AbstractRoad;
import com.bridge.demo1.impl.Bus;
import com.bridge.demo1.impl.Car;
import com.bridge.demo1.impl.SpeedWay;
import com.bridge.demo2.impl.Man;
import com.bridge.demo2.impl.Woman;

/**
 * 结合上面的例子,增加一个维度"人",不同的人开着不同的汽车在不同的路上行驶(三个维度);
 * 
 * @author Administrator
 *
 */
public class Test {

	public static void main(String[] args) {
		AbstractRoad speedWay = new SpeedWay();
		speedWay.aCar = new Car();
		People man = new Man();
		man.road = speedWay;
		man.run();

		speedWay = new SpeedWay();
		speedWay.aCar = new Bus();
		People woman = new Woman();
		woman.road = speedWay;
		woman.run();
	}

}
